#include "SimpleSimulation.h"

CSimpleSimulation::CSimpleSimulation(void){}

CSimpleSimulation::~CSimpleSimulation(void){}

void CSimpleSimulation::simulationUpdate(void)
{
	float* arrayOfParticles=m_particleSystem->m_arrayOfParticles;
	int numberOfParticle=m_particleSystem->m_numberOfParticle;
	int numberOfElementPerParticle=8;
	float eulerStep=m_particleSystem->m_eulerStep;

	for(int i=0; i<numberOfParticle; i=i+numberOfElementPerParticle)
	{
		if(arrayOfParticles[i+7]!=-1)
		{
			arrayOfParticles[i]+=eulerStep*arrayOfParticles[i+3];
			arrayOfParticles[i+1]+=eulerStep*arrayOfParticles[i+4];
			arrayOfParticles[i+2]+=eulerStep*arrayOfParticles[i+5];
		}
	}
}